import { createDiscreteApi, ConfigProviderProps, darkTheme, lightTheme } from 'naive-ui';
import { computed, ref } from 'vue';
const themeRef = ref<'light' | 'dark'>('light');
const configProviderPropsRef = computed<ConfigProviderProps>(() => ({
  theme: themeRef.value === 'light' ? lightTheme : darkTheme,
}));

export const { message } = createDiscreteApi(['message'], {
  configProviderProps: configProviderPropsRef,
});
